﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="IssuePage.aspx.cs" Inherits="mitasoft.ERS.Web.IssuePage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="css/jquery.cleditor.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery.cleditor.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function ()
        {
            $("#tabs").tabs();
            $("#<%= btnAddComment.ClientID %>").button();
            $("#<%= btnClear.ClientID %>").button();
            //$('#addCommentEditor').cleditor();
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <ctrls:MainPageOption ID="issueHeader" runat="server" Title="Open Issue" ImageURL="images/bug_64.png" />
    <table>
        <tr>
            <td>
                Title
            </td>
            <td>
                <div class="FormElementContur">
                    <b>
                        <asp:Label ID="issueTitle" runat="server" /></b>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                Project
            </td>
            <td>
                <div class="FormElementContur">
                    <b>
                        <asp:Label ID="issueProject" runat="server" />
                    </b>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                Type
            </td>
            <td>
                <div class="FormElementContur">
                    <b>
                        <asp:Label ID="issueType" runat="server" />
                    </b>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                Assign to
            </td>
            <td>
                <div class="FormElementContur">
                    -
                </div>
            </td>
        </tr>
        <tr>
            <td valign="top">
                Description
            </td>
            <td valign="top">
                <div id="issueDescription" runat="server" style="border-style: dotted; border-color: Gray;
                    border-width: thin; width: 506px; height: 200px; overflow: auto;">
                </div>
            </td>
        </tr>
        <tr>
            <td>
                Current status
            </td>
            <td>
                <div class="FormElementContur">
                    <b>
                        <asp:Label ID="issueStatus" runat="server" />
                    </b>
                </div>
            </td>
        </tr>
    </table>
    <table>
        <tr>
            <td>
                Set new status
            </td>
            <td>
                <asp:DropDownList ID="ddlIssueStatus" DataValueField="ID" DataTextField="Description"
                    runat="server" CssClass="textbox" Width="120" />
            </td>
            <td>
                <asp:Button ID="btnChangeStatus" runat="server" Text="Change status" />
            </td>
        </tr>
    </table>
    <br />
    <div>
        <div id="tabs" style="height: 500px">
            <ul>
                <li><a href="#tabs-1">View comments</a></li>
                <li><a href="#tabs-2">Add comment</a></li>
                <li><a href="#tabs-3">Steps to reproduce</a></li>
            </ul>
            <div id="tabs-1">
                <div style="overflow: auto; height: 450px">
                    <asp:ListView ID="lstComments" runat="server">
                        <ItemTemplate>
                            <div class="ui-state-highlight">
                                <table>
                                    <tr style="padding: 5px;">
                                        <td valign="top">
                                            <span class="ui-icon ui-icon-info" />
                                        </td>
                                        <td style="width: 120px;" valign="top">
                                            <%# Eval("User")%><br />
                                            <%# Eval("AddedDate")%>
                                        </td>
                                        <td valign="top">
                                            <%# Eval("Description").ToString().Replace(Environment.NewLine, "<br/>")%>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </ItemTemplate>
                    </asp:ListView>
                </div>
            </div>
            <div id="tabs-2">
                <div>
                    <table width="100%">
                        <tr>
                            <td>
                                Write a comment:
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <textarea cols="1" style="width: 100%; overflow: auto;" id="addCommentEditor" rows="9"></textarea>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Button ID="btnAddComment" CssClass="button" runat="server" Text="Add comment" />
                                <asp:Button ID="btnClear" CssClass="button" runat="server" Text="Clear" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div id="tabs-3">
                <p>
                    Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra
                    massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget
                    luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean
                    aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent
                    in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat
                    nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque
                    convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod
                    felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.</p>
            </div>
        </div>
    </div>
    <table>
        <tr>
            <td>
            </td>
        </tr>
    </table>
</asp:Content>
